package com.hege.web;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 将指定前缀的配置转换成对象
 *
 * @Author hege
 * @Date 2020/11/22 20:28
 * @Version 1.0
 */
@Component
@ConfigurationProperties(prefix = "test")
public class Test {

    private String name;
    private String level;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }
}
